<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="net.oschina.team.note.bean.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>即时贴设置页面</title>
<link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.4.custom.min.css">
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css">
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.4.custom.min.js"></script>
<script type="text/javascript" src="js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<link rel="stylesheet" href="css/setting.css">
<script type="text/javascript" src="js/setting.js"></script>
</head>
<body>
<div class="container row">
<div class="col-sm-12 col-md-6 col-lg-6">
	<h4>编辑：</h4>
	<%NotesTemplate notesTemplate = NotesTemplate.getByUser(1); %>
	<form role="form" id="form_sticky_setting" action="#" method="POST">
		<div class="form-group">
		<label>初始化内容</label><textarea class="form-control" type="text" name="content" rows="5" cols="3" /><%=notesTemplate.get("content") %></textarea>
		<input type="hidden" name="id" value="<%=notesTemplate.get("id") %>" />
		<input type="hidden" name="user" value="<%=notesTemplate.get("user") %>" />
		</div>
		<div class="form-group">
		<label>宽度 <small>[<strong>单位</strong>：px；  <strong>范围</strong>：150-500]</small></label><input class="form-control" type="text" name="width"  value="<%=notesTemplate.get("width") %>" />
		<input class="form-control" type="hidden" name="title_left"  value="<%=notesTemplate.get("title_left") %>" />
		</div>
		<div class="form-group">
		<label>高度 <small>[<strong>单位</strong>：px；  <strong>范围</strong>：150-500]</small></label><input class="form-control" type="text" name="height"   value="<%=notesTemplate.get("height") %>" />
		</div>
		<div class="form-group">
			<label class="label_background_color">背景色<%=notesTemplate.get("color") %></label>
			<ul class="background_color_list row">
				<%String color=notesTemplate.get("color"); %>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="color" id="color_1" value="red" <%if(color.equals("red")){ %> checked="checked" <%} %> /><label class="color color_1" for="color_1"><span class="title"></span></label></li>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="color" id="color_2" value="yellow" <%if(color.equals("yellow")){ %> checked="checked" <%} %> /><label class="color color_2" for="color_2"><span class="title"></span></label></li>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="color" id="color_3" value="purple" <%if(color.equals("purple")){ %> checked="checked" <%} %> /><label class="color color_3" for="color_3"><span class="title"></span></label></li>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="color" id="color_4" value="blue" <%if(color.equals("blue")){ %> checked="checked" <%} %> /><label class="color color_4" for="color_4"><span class="title"></span></label></li>
				<li class="col-sm-12 col-xs-8"><input type="radio" name="color" id="color_5" value="green" <%if(color.equals("green")){ %> checked="checked" <%} %> /><label class="color color_5" for="color_5"><span class="title"></span></label></li>
			</ul>
        </div>
        <div class="clear"></div>
		<div class="form-group">
            <label>顶部类型</label><br />
            <ul class="title_style_list row">
            	<%String style_t = notesTemplate.get("style_t"); %>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="style_t" id="t_1" value="1" <%if(style_t.equals("1")){ %> checked="checked"<%} %> /><label class="sticky_title_style t_1" for="t_1"></label></li>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="style_t" id="t_2" value="2" <%if(style_t.equals("2")){ %> checked="checked"<%} %> /><label class="sticky_title_style t_2" for="t_2"></label></li>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="style_t" id="t_3" value="3" <%if(style_t.equals("3")){ %> checked="checked"<%} %> /><label class="sticky_title_style t_3" for="t_3"></label></li>
				<li class="col-sm-6 col-xs-4"><input type="radio" name="style_t" id="t_4" value="4" <%if(style_t.equals("4")){ %> checked="checked"<%} %> /><label class="sticky_title_style t_4" for="t_4"></label></li>
				<li class="col-sm-12 col-xs-8"><input type="radio" name="style_t" id="t_5" value="5" <%if(style_t.equals("5")){ %> checked="checked"<%} %> /><label class="sticky_title_style t_5" for="t_5"></label></li>
			</ul>
		</div>
		<div class="form-group">
		<input type="submit" class="btn btn-primary" value="修改" />
		<span id="tips"></span>
        </div>
	</form>
</div>
<div class="col-sm-12 col-md-6 col-lg-6">
	<h4>预览：</h4>
   		<div id="number1" color="<%=notesTemplate.get("color") %>" titletype="style-<%=notesTemplate.get("style_t") %>" class="note_example <%=notesTemplate.get("color") %> style-<%=notesTemplate.get("style_t") %>" style="width:<%=notesTemplate.get("width") %>px;height:<%=notesTemplate.get("height") %>px;z-index:<%=notesTemplate.get("position_z") %>;">
   			<div class='ntitle'>
       			<span class='nadd' title='添加'></span>
   				<span class="t" style='left:<%=notesTemplate.get("title_left") %>px;top:<%=notesTemplate.get("title_top") %>px;z-index:<%=notesTemplate.get("position_z") %>;'></span>
				<span class='nclose' title='删除'></span>
			</div>
			<%int content_width = notesTemplate.getInt("width"); %>
			<%int content_height = notesTemplate.getInt("height") - 20; %>
			<div class="pan">
				<div class="ncontent" style="width:<%=content_width %>px;height:<%=content_height %>px;"><%=notesTemplate.get("content") %></div>
			</div>
			<div class='pickcolor'></div>
			<div class='colors'>
				<span class='red'></span>
				<span class='yellow'></span>
				<span class='purple'></span>
				<span class='blue'></span>
				<span class='green'></span>
			</div>
   		</div>
</div>
</div>
</body>
</html>